home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / PrintJob.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  71 lines

  1. /*
  2.  * @(#)PrintJob.java    1.6 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt;
  16.  
  17. /** 
  18.  * An abstract class which initiates and executes a print job.
  19.  * It provides access to a print graphics object which renders
  20.  * to an appropriate print device.
  21.  *
  22.  * @see Toolkit#getPrintJob
  23.  *
  24.  * @version     1.6 07/01/98
  25.  * @author     Amy Fowler
  26.  */
  27. public abstract class PrintJob {
  28.  
  29.     /**
  30.      * Gets a Graphics object that will draw to the next page.
  31.      * The page is sent to the printer when the graphics 
  32.      * object is disposed.  This graphics object will also implement
  33.      * the PrintGraphics interface.
  34.      * @see PrintGraphics
  35.      */
  36.     public abstract Graphics getGraphics();
  37.  
  38.     /**
  39.      * Returns the dimensions of the page in pixels.
  40.      * The resolution of the page is chosen so that it
  41.      * is similar to the screen resolution.
  42.      */
  43.     public abstract Dimension getPageDimension();
  44.  
  45.     /**
  46.      * Returns the resolution of the page in pixels per inch.
  47.      * Note that this doesn't have to correspond to the physical
  48.      * resolution of the printer.
  49.      */
  50.     public abstract int getPageResolution();
  51.  
  52.     /**
  53.      * Returns true if the last page will be printed first.
  54.      */
  55.     public abstract boolean lastPageFirst();
  56.  
  57.     /**
  58.      * Ends the print job and does any necessary cleanup.
  59.      */
  60.     public abstract void end();
  61.  
  62.     /**
  63.      * Ends this print job once it is no longer referenced.
  64.      * @see #end
  65.      */
  66.     public void finalize() {
  67.     end();
  68.     }
  69.  
  70. }
  71.